package com.ease.job.quartz.support;

import com.ease.common.enums.EnumUtil;
import com.ease.common.enums.ValuableEnum;

public enum CronJobStatus implements ValuableEnum {
	UNKNOWN((short) 1), //
	RUNNING((short) 2), //
	SHUTDOWN((short) 4); //

	private short value;

	private CronJobStatus(short value) {
		this.value = value;
	}

	public final static CronJobStatus get(short value) {
		return EnumUtil.get(CronJobStatus.class, value, UNKNOWN);
	}

	public final static CronJobStatus get(String name) {
		return EnumUtil.get(CronJobStatus.class, name, UNKNOWN);
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name();
	}

	/**
	 * @return the value
	 */
	public short getValue() {
		return value;
	}

}
